/**
 * JSON-RPC class.
 */
function JSON_RPC()
{
}

/**
 * The global variable used to make calls to the back-end server. 
 */
var loquemeServer;

/**
 * Loads the JSON-RPC bridge.
 * 
 * @param successCallback Called when 
 */
JSON_RPC.load = function(successCallback, errorCallback)
{
    var cb = function(result, e)
    {
        if(e)
        {
        	errorCallback(e);
        }
        else
        {
        	// All OK.
        	successCallback();
        }
    }
    
    // Setup JSON-RPC object.
    loquemeServer = new JSONRpcClient(cb, "/JSON-RPC");
};